﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ERP.Domain.Workorders.Inventory
{
    /// <summary>
    /// 仓库表
    /// </summary>
    [Table("warehouse")]
    public class Warehouse
    {
        /// <summary>
        /// 自增主键
        /// </summary>
        [Key]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int Id { get; set; }

        /// <summary>
        /// 仓库名称
        /// </summary>
        [Required]
        [MaxLength(30)]
        public string WarehouseName { get; set; }

        /// <summary>
        /// 仓库容纳总数量
        /// </summary>
        public int WarehouseCapacity { get; set; }

        /// <summary>
        /// 当前库存总金额
        /// </summary>
        [Column(TypeName = "decimal(12,2)")]
        public decimal? InventoryAmount { get; set; }

        /// <summary>
        /// 货品种类数量
        /// </summary>
        public int? ProductCategories { get; set; }

        /// <summary>
        /// 期初库存金额
        /// </summary>
        [Column(TypeName = "decimal(12,2)")]
        public decimal? InitialAmount { get; set; }

        /// <summary>
        /// 期末库存金额
        /// </summary>
        [Column(TypeName = "decimal(12,2)")]
        public decimal? EndingAmount { get; set; }

        /// <summary>
        /// 累计入库次数
        /// </summary>
        public int? InboundCount { get; set; }

        /// <summary>
        /// 累计入库总数量
        /// </summary>
        public int InboundQuantity { get; set; }

        /// <summary>
        /// 累计入库总金额
        /// </summary>
        [Column(TypeName = "decimal(12,2)")]
        public decimal? InboundAmount { get; set; }

        /// <summary>
        /// 累计出库次数
        /// </summary>
        public int? OutboundCount { get; set; }

        /// <summary>
        /// 累计出库总数量
        /// </summary>
        public int OutboundQuantity { get; set; }

        /// <summary>
        /// 累计出库总金额
        /// </summary>
        [Column(TypeName = "decimal(12,2)")]
        public decimal? OutboundAmount { get; set; }

        /// <summary>
        /// 累计盘点次数
        /// </summary>
        public int? CheckCount { get; set; }

        /// <summary>
        /// 最近一次盘点总数量
        /// </summary>
        public int? LastCheckQuantity { get; set; }

        /// <summary>
        /// 最近一次盘点总金额
        /// </summary>
        [Column(TypeName = "decimal(12,2)")]
        public decimal? LastCheckAmount { get; set; }
    }
}
